<%@ page language="java" pageEncoding="UTF-8"%>
<link href="${pageContext.request.contextPath}/images/layout_login.css" rel="stylesheet"
	type="text/css">
<script type="text/javascript" charset="UTF-8">
	var loginAndRegDialog;
	var loginForm;
	$(function() {
		var user = "${sessionScope.user}";
		if(null == user || "" == user){
		loginAndRegDialog = $('#loginAndRegDialog').show().dialog({
			modal : true,
			closable : false,
			maximized:true,
		});
		}
	});
function loginClick(){
		$.ajax({
			url : '${pageContext.request.contextPath}/login/loginAction!checkLogin.action',
			data : serializeObject($('#loginForm').form()),
			type:'POST',
			dataType : 'json',
			success : function(j) {
				if(j&&j.success){
					$.messager.show({
						msg:j.msg,
						title:'提示'
					});
					loginAndRegDialog.dialog('close');
					$('#indexLayout').layout('panel', 'center').panel('setTitle', sy.fs('[{0}]，欢迎您！[{1}]', j.obj.name, j.obj.ip));
					$("#layout_west_tree").tree('options').url='${pageContext.request.contextPath}/menuAction!getTreeNode.action';
					$("#layout_west_tree").tree('reload');
				}else{
					$.messager.alert('提示',j.msg,'warning');
				}
			}
		});
}
function hrefJbldangl(){
	location.href='${pageContext.request.contextPath}/';
}
</script>
<div id="loginAndRegDialog" iconCls="icon-r" title="欢迎使用金保联档案管理系统v1.0" style="width: 500px;height: 500px;display: none; background:#0D95D3 url(./images/loginbg.jpg) no-repeat ; background-position:top center; color:#666; width:100%;">
	<form id="loginForm" name="loginForm" method="post">
		<div></div>
		<div class="logbox">
			<div class="loginbox">
				<table width="282" border="0" align="right" cellpadding="0"
					cellspacing="0">
					<tbody>
					<tr><td><font color="red">${request.tip}</font></td></tr>
						<tr>
							<td>
								<table width="282" border="0" cellspacing="0" cellpadding="0">
									<tbody>
										<tr>
											<td height="33"
												style="border: 1px solid #d9d9d9; background: no-repeat;
                                        padding-left: 30px; color: #999; font-size: 14px; font-weight: bold">
												用户名 <input name="user" id="user" type="text" maxlength="25"
												id="userName" style="ime-mode: disabled;border: 0"
												value="admin">
											</td>
										</tr>
									</tbody>
								</table></td>
						</tr>
						<tr>
							<td style="padding-top: 12px">
								<table width="282" border="0" cellspacing="0" cellpadding="0">
									<tbody>
										<tr>
											<td height="33"
												style="border: 1px solid #d9d9d9; background: no-repeat;
                                        padding-left: 30px; color: #999; font-size: 14px; font-weight: bold">
												密&nbsp;&nbsp;码 <input name="password" id="password"
												type="password" maxlength="50" id="password"
												style="ime-mode: disabled;border: 0">
											</td>
										</tr>
									</tbody>
								</table></td>
						</tr>
						
						<tr>
							<td style="padding-top: 12px">
								<table width="282" border="0" cellspacing="0" cellpadding="0">
									<tbody>
										<tr>
											<td height="33"
												style="border: 1px solid #d9d9d9; background: no-repeat;
                                        padding-left: 30px; color: #999; font-size: 14px; font-weight: bold">
                                        
												验证码  <input name="verifyCode" id="verifyCode" type="text" size="7" maxlength="5" />
												
             									 <img id="chk_img" src="./log/yanzhenma.jsp" border="0" />
             											 
             								<input type="button" value="刷新" onclick="hrefJbldangl()"/>
             								<td>
											
										</tr>
									</tbody>
								</table></td>
						</tr>
						<tr>
							<td height="50" valign="bottom">
								<table border="0" align="center" cellpadding="0" cellspacing="0">
									<tbody>
										<tr>
											<td><input type="image" name="IBtnLogin"  id="IBtnLogin" onclick="loginClick()"
												border="0" src="${pageContext.request.contextPath}/images/btn_login.gif"
												style="border-width:0px;">
											</td>
											<td width="80" align="right">&nbsp;</td>
										</tr>
									</tbody>
								</table></td>
						</tr>
					</tbody>
				</table>
			</div>
		</div>
		<p align="center">
			Copyright <span class="copyright">©</span> 北京金保联金融服务外包有限公司<img
				border="0" hspace="0" vspace="0" src="${pageContext.request.contextPath}/images/pic.gif">
		</p>
		<div></div>
	</form>
</div>